(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  ["pages/shop/shop"], {
    "2fe2": function (a, n, t) {
      "use strict";
      (function (a) {
        Object.defineProperty(n, "__esModule", {
          value: !0
        }), n.default = void 0;
        var e = o(t("a34a"));

        function o(a) {
          return a && a.__esModule ? a : {
            default: a
          }
        }

        function i(a, n, t, e, o, i, s) {
          try {
            var r = a[i](s),
              l = r.value
          } catch (c) {
            return void t(c)
          }
          r.done ? n(l) : Promise.resolve(l).then(e, o)
        }

        function s(a) {
          return function () {
            var n = this,
              t = arguments;
            return new Promise((function (e, o) {
              var s = a.apply(n, t);

              function r(a) {
                i(s, e, o, r, l, "next", a)
              }

              function l(a) {
                i(s, e, o, r, l, "throw", a)
              }
              r(void 0)
            }))
          }
        }
        var r = {
          data: function () {
            return {
              shop_id: 0,
              wanlsys: this.$wanlshop.wanlsys(),
              pageCur: "home",
              pageType: !0,
              pageData: {
                page: {
                  params: {
                    navigationBarTitleText: "搜索店内商品"
                  },
                  style: {
                    navigationBarBackgroundColor: "#fa5a7b",
                    navigationBarTextStyle: "#333"
                  }
                }
              },
              shopData: {
                shopname: "加载中..",
                follow: !1,
                like: 0
              },
              categoryData: [],
              categoryChildlistData: [],
              showRight: !1,
              Opacity: 0,
              WanlScroll: 0,
              scrollStype: !1,
              background: "../../static/1200px-wanLan_logo_bg.png",
              filterIndex: 0,
              goodsData: [],
              priceOrder: 0,
              listStyle: "col-1-10",
              
              params: {
                search: "",
                sort: "weigh",
                order: "asc",
                page: 1,
                filter: {},
                op: {}
              },
              reload: !1,
              last_page: 0,
              status: "loading",
              contentText: {
                contentdown: "",
                contentrefresh: "正在加载..",
                contentnomore: "没有更多数据了"
              }
            }
          },
          onLoad: function (a) {
            this.shop_id = a.id, this.params.filter = {
              shop_id: this.shop_id
            }, this.params.op = {
              shop_id: "="
            }, this.loadPageData(), a.type && this.tabClick(a.type)
          },
          onPageScroll: function (a) {
            var n = 20 + this.wanlsys.top;
            a.scrollTop = a.scrollTop > n ? n : a.scrollTop, this.Opacity = a.scrollTop * (1 / n)
          },
          onPullDownRefresh: function () {
            this.params.page = 1, this.reload = !0, this.loadData()
          },
          onReachBottom: function () {
            this.params.page >= this.last_page ? this.status = "noMore" : (this.reload = !1, this.contentText.contentdown = "上拉显示更多", this.params.page = this.params.page + 1, this.status = "loading", this.loadData())
          },
          onUnload: function () {
            if (this.showRight) return this.closeDrawer(), !0
          },
          methods: {
            loadData: function () {
              var n = this;
              return s(e.default.mark((function t() {
                return e.default.wrap((function (t) {
                  while (1) switch (t.prev = t.next) {
                    case 0:
                      n.$api.get({
                        url: "/wanlshop/product/lists",
                        data: n.params,
                        success: function (t) {
                          a.stopPullDownRefresh(), n.status = 0 == t.total ? "noMore" : "more", n.goodsData = n.reload ? t.data : n.goodsData.concat(t.data), 0 == t.data.length && n.loadlikeData(), n.params.page = t.current_page, n.last_page = t.last_page
                        }
                      });
                    case 1:
                    case "end":
                      return t.stop()
                  }
                }), t)
              })))()
            },
            loadPageData: function () {
              var a = this;
              return s(e.default.mark((function n() {
                return e.default.wrap((function (n) {
                  while (1) switch (n.prev = n.next) {
                    case 0:
                      a.$api.get({
                        url: "/wanlshop/shop/page",
                        data: {
                          id: a.shop_id
                        },
                        success: function (n) {
                          a.status = "more", a.shopData = n.shop, a.categoryData = n.category, n.page ? (a.pageData = n.page, a.background = n.page.page.style.pageBackgroundImage) : a.tabClick(1)
                        }
                      });
                    case 1:
                    case "end":
                      return n.stop()
                  }
                }), n)
              })))()
            },
            Tofollow: function () {
              var a = this;
              return s(e.default.mark((function n() {
                return e.default.wrap((function (n) {
                  while (1) switch (n.prev = n.next) {
                    case 0:
                      a.shopData.follow = !a.shopData.follow, a.shopData.follow ? (a.shopData.like += 1, a.$store.commit("statistics/dynamic", {
                        concern: a.$store.state.statistics.dynamic.concern + 1
                      })) : (a.shopData.like -= 1, a.$store.commit("statistics/dynamic", {
                        concern: a.$store.state.statistics.dynamic.concern - 1
                      })), a.$api.post({
                        url: "/wanlshop/shop/follow",
                        data: {
                          id: a.shopData.id
                        },
                        success: function (n) {
                          a.shopData.follow = n
                        }
                      });
                    case 3:
                    case "end":
                      return n.stop()
                  }
                }), n)
              })))()
            },
            navChange: function (a) {
              "home" == a ? this.tabClick(0) : "allgoods" == a && this.tabClick(1), this.pageType = "category" != a, this.pageCur = a
            },
            tabClick: function (n) {
              this.filterIndex === n && 4 !== n || (this.priceOrder = 4 === n ? 1 === this.priceOrder ? 2 : 1 : 0, this.filterIndex = n, 0 === n ? this.loadPageData() : (1 === n && (this.params.sort = "weigh", this.params.order = "asc"), 2 === n && (this.params.sort = "sales", this.params.order = "asc"), 3 === n && (this.params.sort = "createtime", this.params.order = "asc"), 4 === n && 1 === this.priceOrder && (this.params.sort = "price", this.params.order = "asc"), 4 === n && 2 === this.priceOrder && (this.params.sort = "price", this.params.order = "desc"), this.params.page = 1, this.reload = !0, this.loadData()), this.status = "loading", a.pageScrollTo({
                duration: 300,
                scrollTop: 0
              }))
            },
            editStyle: function () {
              this.listStyle = "col-1-10" == this.listStyle ? "col-2-10" : "col-1-10"
            },
            showDrawer: function (a) {
              this.showRight = !0, this.categoryChildlistData = a
            },
            closeDrawer: function () {
              this.showRight = !1
            },
            productCategoryList: function (a, n) {
              this.$wanlshop.to("productList?shop_id=" + this.shop_id + "&category_id=" + a + "&category_name=" + n)
            },
            search: function () {
              this.$wanlshop.to("productList?shop_id=" + this.shop_id, "fade-in", 100)
            },
            shopInfo: function () {
              this.$wanlshop.to("info?shop_id=" + this.shop_id)
            }
          }
        };
        n.default = r
      }).call(this, t("543d")["default"])
    },
    "531c": function (a, n, t) {
      "use strict";
      t.r(n);
      var e = t("2fe2"),
        o = t.n(e);
      for (var i in e) "default" !== i && function (a) {
        t.d(n, a, (function () {
          return e[a]
        }))
      }(i);
      n["default"] = o.a
    },
    7034: function (a, n, t) {
      "use strict";
      t.d(n, "b", (function () {
        return o
      })), t.d(n, "c", (function () {
        return i
      })), t.d(n, "a", (function () {
        return e
      }));
      var e = {
          wanlPageBanner: function () {
            return t.e("components/wanl-page-banner/wanl-page-banner").then(t.bind(null, "ea3f"))
          },
          wanlPageImage: function () {
            return t.e("components/wanl-page-image/wanl-page-image").then(t.bind(null, "7260"))
          },
          wanlPageVideo: function () {
            return t.e("components/wanl-page-video/wanl-page-video").then(t.bind(null, "c548"))
          },
          wanlPageMenu: function () {
            return t.e("components/wanl-page-menu/wanl-page-menu").then(t.bind(null, "4284"))
          },
          wanlPageNotice: function () {
            return t.e("components/wanl-page-notice/wanl-page-notice").then(t.bind(null, "c65c"))
          },
          wanlPageArticle: function () {
            return Promise.all([t.e("common/vendor"), t.e("components/wanl-page-article/wanl-page-article")]).then(t.bind(null, "5ba8"))
          },
          wanlPageHeadlines: function () {
            return Promise.all([t.e("common/vendor"), t.e("components/wanl-page-headlines/wanl-page-headlines")]).then(t.bind(null, "683d"))
          },
          wanlPageSearch: function () {
            return t.e("components/wanl-page-search/wanl-page-search").then(t.bind(null, "6c7d"))
          },
          wanlPageActivity: function () {
            return Promise.all([t.e("common/vendor"), t.e("components/wanl-page-activity/wanl-page-activity")]).then(t.bind(null, "70aa"))
          },
          wanlPageCategoryTitle: function () {
            return t.e("components/wanl-page-category-title/wanl-page-category-title").then(t.bind(null, "5200"))
          },
          wanlPageClassify: function () {
            return Promise.all([t.e("common/vendor"), t.e("components/wanl-page-classify/wanl-page-classify")]).then(t.bind(null, "d80b"))
          },
          wanlPageLikes: function () {
            return Promise.all([t.e("common/vendor"), t.e("components/wanl-page-likes/wanl-page-likes")]).then(t.bind(null, "12fb"))
          },
          wanlPageGoods: function () {
            return Promise.all([t.e("common/vendor"), t.e("components/wanl-page-goods/wanl-page-goods")]).then(t.bind(null, "ca10"))
          },
          wanlPageBargain: function () {
            return t.e("components/wanl-page-bargain/wanl-page-bargain").then(t.bind(null, "dbb2"))
          },
          wanlPageSeckill: function () {
            return t.e("components/wanl-page-seckill/wanl-page-seckill").then(t.bind(null, "d5b7"))
          },
          wanlPageEmpty: function () {
            return t.e("components/wanl-page-empty/wanl-page-empty").then(t.bind(null, "3d95"))
          },
          wanlPageDivision: function () {
            return t.e("components/wanl-page-division/wanl-page-division").then(t.bind(null, "c202"))
          },
          wanlProduct: function () {
            return Promise.all([t.e("common/vendor"), t.e("components/wanl-product/wanl-product")]).then(t.bind(null, "d93b"))
          },
          uniDrawer: function () {
            return t.e("components/uni-drawer/uni-drawer").then(t.bind(null, "98d4"))
          },
          uniLoadMore: function () {
            return t.e("components/uni-load-more/uni-load-more").then(t.bind(null, "ac38"))
          }
        },
        o = function () {
          var a = this,
            n = a.$createElement,
            t = (a._self._c, a.$wanlshop.oss(a.background, 500, 0, 1, "transparent", "png")),
            e = "home" == a.pageCur ? a.$wanlshop.oss(a.shopData.avatar, 38, 38, 2, "avatar") : null,
            o = a.$wanlshop.toFormat(a.shopData.like, "thousand");
          a._isMounted || (a.e0 = function (n) {
            return a.$wanlshop.back(1)
          }), a.$mp.data = Object.assign({}, {
            $root: {
              g0: t,
              g1: e,
              g2: o
            }
          })
        },
        i = []
    },
    c2cd: function (a, n, t) {
      "use strict";
      t.r(n);
      var e = t("7034"),
        o = t("531c");
      for (var i in o) "default" !== i && function (a) {
        t.d(n, a, (function () {
          return o[a]
        }))
      }(i);
      var s, r = t("f0c5"),
        l = Object(r["a"])(o["default"], e["b"], e["c"], !1, null, null, null, !1, e["a"], s);
      n["default"] = l.exports
    },
    ffce: function (a, n, t) {
      "use strict";
      (function (a) {
        t("77a0");
        e(t("66fd"));
        var n = e(t("c2cd"));

        function e(a) {
          return a && a.__esModule ? a : {
            default: a
          }
        }
        a(n.default)
      }).call(this, t("543d")["createPage"])
    }
  },
  [
    ["ffce", "common/runtime", "common/vendor"]
  ]
]);
